<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="joda" uri="http://www.joda.org/joda/time/tags" %>
<!-- Khalil -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Setting - Acu</title>
<link rel="stylesheet" href="<c:url value="/css/tableStyle.css"/>" />

</head>
<body>
<%@ page import="org.joda.time.LocalDateTime"  %>


<h1>Acu List</h1>
<s:form namespace="setting" method="post">
<s:submit value="新增" method="update" />
<table>
	<thead>
		<tr>
			<th>ACU_NO</th>
			<th>ACU_DESC</th>
		</tr>
	</thead>
	<tbody>
			<tr>
				<td style="display:none"><input type="text" size="10" name="model.id" value=""/></td>
				<td><input type="text" size="10" name="model.acuNo" value=""/></td>
				<td><input type="text" size="10" name="model.acuDesc" value=""/></td>
				<td style="display:none"><input type="text" name="model.creator" value="OOO"/></td>
				<joda:format var="currentTime" value="<%= LocalDateTime.now() %>" pattern="yyyy-MM-dd HH:mm:ss"/>
				<td style="display:none"><input type="text" name="model.createTime" value="${currentTime}"/></td>
				<td style="display:none"><input type="text" name="model.modifier" value="XXX"/></td>
				<td style="display:none"><input type="text" name="model.modifiedTime" value=""/></td>
			
				
				<td style="text-align: right"><label>AcuNo:</label>
				<input type="text" size="10" name="searchBox" value="${searchBox}"/>
				<s:submit cssClass="button" value="搜尋" method="search" /></td>
			</tr>
		
	</tbody>
</table>
</s:form>

<table>
	<thead>
		<tr>
			<th>FUNCTION</th>
			<th>ID</th>
			<th>ACU_NO</th>
			<th>ACU_DESC</th>
			<th>Creator</th>
			<th>CreateTime</th>
			<th>Modifier</th>
			<th>ModifiedTime</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach items="${models}" var="item" varStatus="status">
		<s:form namespace="setting" method="post">
			<tr>
				<td>	
					<s:submit value="修改" method="update" />
					<s:submit value="刪除" method="delete" />
				</td>
				<td><s:textfield readonly="true" name="model.id" value="%{#attr.item.id}"/></td>
				<td><s:textfield  name="model.acuNo" value="%{#attr.item.acuNo}"/></td>
				<td><s:textfield  name="model.acuDesc" value="%{#attr.item.acuDesc}"/></td>
				<td><s:textfield readonly="true" name="model.creator" value="%{#attr.item.creator}"/></td>
				<joda:format var="createTime" value="${item.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
				<td><s:textfield readonly="true" name="model.createTime" value="%{#attr.createTime}"/></td>
				<td><s:textfield readonly="true" name="model.modifier" value="%{#attr.item.modifier}"/></td>
				<joda:format var="modifiedTime" value="${item.modifiedTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
				<td><s:textfield readonly="true" name="model.modifiedTime" value="%{#attr.modifiedTime}"/></td>
		</tr>
			</s:form>
		</c:forEach>
	</tbody>
</table>

</body>
</html>